/*
 * Logger.h
 *
 *  Created on: 7 июн. 2022 г.
 *      Author: nikita
 */

#ifndef SRC_TECHNICAL_LOGGER_H_
#define SRC_TECHNICAL_LOGGER_H_

#include "../STL_includes.h"
#include "RuntimeErrorClass.h"
#include "FileManager.h"

namespace STC_calc
{

class Logger
{
private:

	static std::string file_name;
	static std::string buffer;
	static bool is_defined;
	static std::function<void(const std::string&)> outfunc;

	static void help();
	static void write_to_file(const std::string& str);
	static void write_to_terminal(const std::string& str);
	static void write_all();

	Logger();
	~Logger();

public:

	static void start_message();
	static void set_global_file(const std::string& name = "~default%terminal");
	static void put(const std::string& str);


};

} /* namespace STC_calc */

#endif /* SRC_TECHNICAL_LOGGER_H_ */
